{% extends 'base.html' %}

{% block title %}编辑文档 - {{ document.title }} - Django RBAC 项目{% endblock %}

{% block content %}
<div class="container mx-auto px-4 py-8">
    <h1 class="text-2xl font-bold mb-6">编辑文档: {{ document.title }}</h1>

    <div class="bg-white shadow-md rounded px-8 pt-6 pb-8 mb-4">
        <form method="post">
            {% csrf_token %}
            <div class="mb-4">
                <label class="block text-gray-700 text-sm font-bold mb-2" for="{{ form.title.id_for_label }}">
                    文档标题
                </label>
                {{ form.title }}
            </div>
            <div class="flex items-center justify-between">
                <button class="bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded focus:outline-none focus:shadow-outline" type="submit">
                    保存更改
                </button>
                <a class="inline-block align-baseline font-bold text-sm text-blue-500 hover:text-blue-800" href="{% url 'document_list' %}">
                    返回文档列表
                </a>
            </div>
        </form>
    </div>
</div>
{% endblock %}

